<?php $this->pageTitle=Yii::app()->name; ?>

<p>Configurations:</p>
<ul>
	<li>Snort Conf File Path: <tt><?php echo Yii::app()->params["confPath"] ?></tt></li>
	<li>Rule File Path: <tt><?php echo Yii::app()->params["rulePath"] ?></tt></li>
</ul>

<div class="well" id="statistics">

View Rule Distribution: Totally <?php echo DataHelper::getRuleTotCnt()?> Rules Of <?php echo DataHelper::getRuleClassTotCnt()?> classes
<div class="tabbable">
    <ul class="nav nav-tabs">
    <li class="active"><a href="#1" data-toggle="tab">In column</a></li>
    <li><a href="#2" data-toggle="tab">In pie</a></li>
    </ul>
    <div class="tab-content">
    <div class="tab-pane" id="2">
    <p><?php
$this->widget('ext.highcharts.HighchartsWidget',array(
	'options' => array(
		'title' => array('text'=>'rule distribution'),
		'series' => array(array(
			'type' => 'pie',
			'data' => DataHelper::getDistribution(),
			)
		),
		'tooltip'=>array( 'formatter'=>"js:function() {
				return '<b>'+ this.point.name +'</b>: '+  Highcharts.numberFormat(this.percentage, 2)  +' %';}"),
	)
));

?></p>
    </div>
    <div class="tab-pane active" id="1">
    <p><?php
$this->widget('ext.highcharts.HighchartsWidget',array(
	'options' => array(
		'title' => array('text'=>'rule distribution'),
		'series' => array(array(
			'type' => 'column',
			'data' => DataHelper::getDistribution(),
			)
		),
		'tooltip'=>array( 'formatter'=>"js:function() {
				return '<b>'+ this.point.name +'</b>: '+  this.y  +' rules';}"),
	)
));

?></p>
    </div>
    </div>
    </div>
</div>
